#ifndef INTEGERFIRSTOPSETHASHSUBTRACTIONTESTER_H_JM_20130228
#define INTEGERFIRSTOPSETHASHSUBTRACTIONTESTER_H_JM_20130228

#include "../../models/ThreeStepOnePassDbOperationModel.h"
#include "../../models/InputBoxConfiguration.h"

namespace jm4bbx {

	template<int parallelismLevel>
	class IntegerFirstOpSetHashSubtractionTester : 
		public TesterSharedOutputBoxImplSql, public ModelTest {
	public:

		virtual std::string getTestName() const override {
			return std::string("IntegerFirstOpSetHashSubtractionTester[") + 
				jmlib::convert<std::string>(parallelismLevel) + "]";
		}

		virtual std::string getDataSpecification() const override { 
			return "SELECT c1 FROM data_2 EXCEPT SELECT c1 FROM data_3"; 
		};

		virtual size_t getSharedOutputCount() const override {
			return parallelismLevel;
		}

		virtual std::string getModel() override {
			// Zaregistrovanie boxu do runtimu.
			static std::string outputBoxName = 
				std::string("IntegerFirstOpSetHashSubtractionTesterOUT_") 
				+ jmlib::convert<std::string>(parallelismLevel);
			typedef IntegerFirstOpSetHashSubtractionTester<parallelismLevel> ImplType;
			registerBox<ImplType>(outputBoxName.c_str());
			// Konfiguracia generatoru modelu.
			InputBoxConfiguration first = {"SELECT@c1@FROM@data_3", 0};
			InputBoxConfiguration second = {"SELECT@c1@FROM@data_2", 0};

			ThreeStepOnePassDbOperationModel amg(getSharedOutputCount(), 
				"SQL_BOX", first, second, "HASH_INTEGER", 
				"HASH_F_SUBTRACTION_INTEGER", outputBoxName.c_str(), "first", 
				"IntegerKeyRecord", false,  "HASH_FR_SUBTRACTION_INTEGER");
			// Vygenerovanie modelu.
			return amg.generateModel();
		}
	};


} // namespace jm4bbx


	

#endif
